import React from "react";
import { Link } from "react-router-dom";

function XtxBreadItem({
  to,
  children,
}: {
  to?: string | object;
  children: React.ReactNode;
}) {
  return (
    <>
      <div className="xtx-bread-item">
        {to ? <Link to={to}>{children}</Link> : <span>{children}</span>}
      </div>
    </>
  );
}

export default XtxBreadItem;
